package chixing.day02;

import java.io.FileNotFoundException;
import java.io.Reader;
import java.io.FileReader;
import java.io.IOException;

public class BasicSyntaxDemo {
    public static void main(String[] args) throws IOException {
        // 打印 a 到 z
        for (char i = 'a'; i <= 'z'; i++) {
            System.out.println(i);
        }

        char c5 = 97;
        char c6 = (char) (c5 + 1);
        System.out.println(c6);

        Reader r = new FileReader("D:/a/a.txt") ;
            int ch1 =  r.read();
            int ch2 = r.read();
         System.out.println(ch1);
         System.out.println(ch2);
        String str3 = "Reads a single character";
        char[] charArray = str3.toCharArray();
        for(int i = 0;i<charArray.length;i++){
            System.out.print(charArray[i] + ",");
        }
        System.out.println();
        byte[] byteArray = str3.getBytes();
        for(int i = 0;i<byteArray.length;i++){
            System.out.print(byteArray[i] + ",");
        }
        System.out.println();

        }
}
